package com.joyhonest.ruler;

import java.text.SimpleDateFormat;

public class DateUtil {
    private static SimpleDateFormat format = new SimpleDateFormat("HH:mm");

    /**
     * 根据刻度索引获取HH:mm格式的时间
     */
    public static String getHourMinute(int timeIndex) {
        return String.format("%02d:%02d", timeIndex / 60, timeIndex % 60);
    }
}
